<style>
    .required {
        color: red;
        font-size: 18px;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">用户信息:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-user" data-rule="required" readonly class="form-control" size="50" name="user" type="text" value="{$row.user.nickname|htmlentities}">
                <input id="c-uid" data-rule="required" readonly name="row[uid]" type="hidden" value="{$row.uid|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="select-user" class="btn btn-info" ><i class="fa fa-user-plus"></i> 选择用户</button></span>

                </div>
                <span class="msg-box n-right" for="c-user"></span>
            </div>
            <p style="color: red">注: 不选择自动创建用户账号</p>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[gender]', ['1'=>__('Gender 1'), '0'=>__('Gender 0')], $row['gender'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>会员籍贯:</label>
        <div class="col-xs-12 col-sm-8">
<!--            <input id="c-birthplace" data-rule="required" data-level="area" placeholder="请选择省/市/区" data-toggle="city-picker" class="form-control" name="row[birthplace]" type="text" value="{$row.birthplace|htmlentities}">-->
            <input id="c-birthplace" data-rule="required" class="form-control" name="row[birthplace]" type="text" value="{$row.birthplace|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Picture')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-picture" class="form-control" size="50" name="row[picture]" type="text" value="{$row.picture|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-picture" class="btn btn-danger faupload" data-input-id="c-picture" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-picture"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-picture" class="btn btn-primary fachoose" data-input-id="c-picture" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-picture"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-picture"></ul>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('所属商会')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-commerce_id" data-rule="" data-source="prefectural_chamber_of_commerce/selectpage" data-field="title" data-params='{"custom[mold]":"1"}' data-page-size="15" class="form-control selectpage" name="row[commerce_id]" type="text" value="{$row.commerce_id|htmlentities}">-->
<!--            <p style="color: red">注: 不选择默认为省商会</p>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Commerce_post')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-level_id" data-rule="required" readonly data-source="wdsxh/member_unit_level/selectpage" class="form-control selectpage" name="row[level_id]" type="text" value="{$row.level_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_post')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_post" class="form-control" name="row[company_post]" type="text" value="{$row.company_post|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Society_post')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-society_post" class="form-control" name="row[society_post]" type="text" value="{$row.society_post|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Political_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-political_status" class="form-control" name="row[political_status]" type="text" value="{$row.political_status|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-images" class="form-control" size="50" name="row[images]" type="textarea" value="{$row.images|htmlentities}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-images"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline faupload-preview" id="p-images"></ul>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Introduction')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-introduction" class="form-control editor" rows="5" name="row[introduction]" cols="50">{$row.introduction|htmlentities}</textarea>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">入会时间:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-jointime" data-rule="required" class="form-control datetimepicker" name="row[jointime]" data-date-format="YYYY-MM-DD" type="text" value="{$row.jointime}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">到期时间:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-expiretime" data-rule="required" class="form-control datetimepicker" name="row[expiretime]" data-date-format="YYYY-MM-DD" type="text" value="{$row.expiretime}">-->
<!--        </div>-->
<!--    </div>-->

    <!--企业信息-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Cat_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cat_id" data-rule="required" readonly data-source="wdsxh/member_unit_cat/index" class="form-control selectpage" name="row[company][cat_id]" type="text" value="{$row.company.cat_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Company_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_name" data-rule="required" class="form-control" name="row[company][company_name]" type="text" value="{$row.company.company_name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_logo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-company_logo" class="form-control" size="50" name="row[company][company_logo]" type="text" value="{$row.company.company_logo}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-company_logo" class="btn btn-danger faupload" data-input-id="c-company_logo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-company_logo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-company_logo" class="btn btn-primary fachoose" data-input-id="c-company_logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-company_logo"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-company_logo"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Company_introduce')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-company_introduce" data-rule="required" class="form-control editor" rows="5" name="row[company][company_introduce]" cols="50">{$row.company.company_introduce}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Company_product')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-company_product" data-rule="" class="form-control editor" rows="5" name="row[company][company_product]" cols="50">{$row.company.company_product}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_mobile" data-rule="" class="form-control" name="row[company][company_mobile]" type="text" value="{$row.company.company_mobile}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>{:__('Company_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_address" data-toggle="city-picker" data-rule="required" class="form-control" name="row[company][company_address]" type="text" value="{$row.company.company_address}">
            <input id="c-company_address_detail" placeholder="输入详细地址" data-rule="required" class="form-control" name="row[company][company_address_detail]" type="text" value="{$row.company.company_address_detail}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span class="required">*</span>位置坐标:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <div class="input-group-addon">
                    经度
                </div>
                <input id="c-lng" data-rule="required" readonly class="form-control" name="row[company][company_address_lng]" type="number" value="{$row.company.company_address_lng}">
                <div class="input-group-addon">
                    纬度
                </div>
                <input id="c-lat" data-rule="required" readonly class="form-control" name="row[company][company_address_lat]" type="number" value="{$row.company.company_address_lat}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="sel-location" data-toggle="addresspicker" data-lat-id="c-lat" data-lng-id="c-lng" class="btn btn-danger sel-location" data-input-id="" ><i class="fa fa-map-marker"></i> {:__('选择坐标')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lng"></span>
                <span class="msg-box n-right" for="c-lat"></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_site')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_site" class="form-control" name="row[company][company_site]" type="text" value="{$row.company.company_site}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_email" class="form-control" name="row[company][company_email]" type="text" value="{$row.company.company_email}">
        </div>
    </div>
    <!--企业信息-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Index')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="indexList" item="vo"}
                <label for="row[index]-{$key}"><input id="row[index]-{$key}" name="row[index]" type="radio" value="{$key}" {in name="key" value="$row.index"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
